Eclipse Platform
Pre-release 3.0

org.eclipse.ui.commands
Interface ICommandHandlerService

All Known Subinterfaces:
ICompoundCommandHandlerService, IMutableCommandHandlerService

public interface ICommandHandlerService

An instance of this interface allows clients to manage command handlers.

This interface is not intended to be extended or implemented by clients.

EXPERIMENTAL

Since:
3.0
See Also:
CommandHandlerServiceFactory

Method Summary
 void addCommandHandlerServiceListener(ICommandHandlerServiceListener commandHandlerServiceListener)
          Registers an instance of ICommandHandlerServiceListener to listen for changes to properties of this instance.
 Map getHandlersByCommandId()
          Returns the map of handlers by command identifier.
 void removeCommandHandlerServiceListener(ICommandHandlerServiceListener commandHandlerServiceListener)
          Unregisters an instance of ICommandHandlerServiceListener listening for changes to properties of this instance.
 

Method Detail

addCommandHandlerServiceListener

public void addCommandHandlerServiceListener(ICommandHandlerServiceListener commandHandlerServiceListener)
Registers an instance of ICommandHandlerServiceListener to listen for changes to properties of this instance.

Parameters:
commandHandlerServiceListener - the instance to register. Must not be null. If an attempt is made to register an instance which is already registered with this instance, no operation is performed.

getHandlersByCommandId

public Map getHandlersByCommandId()
Returns the map of handlers by command identifier.

Notification is sent to all registered listeners if this property changes.

Returns:
the map of handlers by command identifier. This map may be empty, but its keys and values are guaranteed not to be null. If this map is not empty, its key set is guaranteed to only contain instances of String and its value set is guaranteed to only contain instances of IHandler

removeCommandHandlerServiceListener

public void removeCommandHandlerServiceListener(ICommandHandlerServiceListener commandHandlerServiceListener)
Unregisters an instance of ICommandHandlerServiceListener listening for changes to properties of this instance.

Parameters:
commandHandlerServiceListener - the instance to unregister. Must not be null. If an attempt is made to unregister an instance which is not already registered with this instance, no operation is performed.

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.